S = {1, 2, 3, 4, 5}
S.add(6)
print(S)
S = {1, 2, 3, 4, 5}
S.discard(6)  # 不报错
S.discard(5)
print(S)
S = {1, 2, 3, 4, 5}
# S.remove(6)  # 报错
S.remove(5)
print(S)
S.clear()
print(S)
# print(S.pop())  # S为空，报错
S = {1, 2, 3, 4, 5}
print(S.pop())
print(S)
S = {1, 2, 3, 4, 5}
print(S.copy()-{1, 2, 3})
print(S)
print(len(S))

